﻿using BloggerAutoPosterService.Engine.Net;
using NUnit.Framework;

namespace BloggerAutoPosterService.Tests
{
    [TestFixture]
    public class TestRssReader
    {
        [Test]
        public void Test1_RssReader_Can_Read_All_Data()
        {
            var items = RssReader.GetEntries("rss.xml");
            Assert.That(items[5].Title == "WinRT vs. Silverlight - Part 1 - XML Namespace");
            Assert.That(items[5].Link == "http://www.iter.dk/post.aspx?id=a7c00c94-44ac-4d3f-8e6d-c4b8995215c5");
            Assert.That(items[5].Author == "(author unknown)");
            Assert.That(items[7].Link == "http://blog.afsharm.com/2011/09/mvp.html");
        }

        [Test]
        public void Test1_RssReader_Can_Read_Data_Annotation()
        {
            var items = RssReader.GetEntries("rss2.xml");            
            Assert.That(items[0].Annotation == "نگارش جديد YUICompressor منتشر شد");
        }
    }
}
